package JUC;

/**
 * @Author cj
 * @Date 2023/5/12 8:23
 */
public class ThreadDemo2 {
    //定义一个多线程
    public static class MyThread implements Runnable {
        @Override
        public void run() {
            System.out.println("MyThread.run()");
        }
    }

    public static void main(String[] args) {
        //启动线程
        MyThread myThread = new MyThread();
        Thread thread = new Thread(myThread);
        thread.start();
        Thread thread2 = new Thread(myThread);
        thread2.start();
    }

}
